package com.nowcoder.community.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "qiniu")
@Data
public class QiniuProperty {
    private final Key key = new Key();
    private final Header header = new Header();
    private final Share share = new Share();

    private String uploadUrl;

    @Data
    public static class Key{
        private String accessKey;
        private String secretKey;
    }

    @Data
    public static class Header {
        private String bucketName;
        private String bucketUrl;
    }

    @Data
    public static class Share{
        private String bucketName;
        private String bucketUrl;
    }
}
